package exception;

public class Demo2 {
    public static void main(String[] args) {
        //异常处理
        int[] arr = {1,2,3};
        try {
            System.out.println(arr[3]);
        } catch (ArrayIndexOutOfBoundsException e) {
          /*  String message = e.getMessage();
            System.out.println(message);
            String str = e.toString();
            System.out.println(str);*/
            e.printStackTrace();
        }
        System.out.println("test");
    }
}
